<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>留学生管理系统</title>  
        <link rel="stylesheet" href="${path}/css/admin2.css">
        <script>
            var _current_item = "#adminScoreManage";
        </script>
        <style>
        .p-div{
        border:0px solid #9A9A9A;
        width:750px;
        padding:0px;
        margin:auto;
        font-size:20px;
        }
        table{
    	width: 100%;
    	text-align: left;
    	border-collapse: collapse;
		}
		table th{
    	padding: 10px 0;
    	border: 1px solid #aaa;
    	border-width:0 0 2px 0;
		}
		table td{
    	padding: 10px 0;
    	border: 0px solid #aaa;
		}
        </style>
        <script type="text/javascript" src="${path}/js/jquery.min.js"></script>
    </head>
    <body>
    
        <!--header-->
        <div id="mask"></div>
        <div id="header"></div>
        <div id="main">
            <div id="side-menu"></div>
            <div id="container">
                <div id="inner-border">
                <div id="content_holder">
           
            <div id="ele2" >
                <div class="p-div">
                <button class="print-link no-print" style="width:60px;float:right;margin-top:-10px">
               		 打印
                </button>
                <img style="width:100%;height:260px" src="../img/socreTitle.jpg"></img>
               <div style="width:350px;margin:25px 20px 25px 20px;border:0px solid red;float:left">This is to certify that<br>
               <span class="name"></span><br>
               Attend the University in the years <span id="term"></span></div>
                <div style="width:300px;margin-top:25px;border:0px solid red;float:left">STUDENT NAME：<span class="name"></span><br><br>
                STUDENT ID NO：<span class="passNo"></span></div>
                
                <div id="grade">
                
                </div>
                
                
                <div style="width:100%;border-top:2px solid #aaa;margin-left:5px;padding-top:5px;float:left;font-size:16px">
                <div style="float:left;margin:0 35px 0 5px">GRADING SYSTEM<br />
                A-4.0 C-2.0 F-0.0 WP=Withdraw<br />
                Passing<br />
                B-3.0 P-1.0 WP=Withdraw</div>
                <div style="float:left">This official document is bona fide when imprinted<br />
                with the institutional seal in the section to the left.<br />
                This document may not be relevant to a third party<br />
                without written consent of the student.</div>
                </div>
               </div>
              
            </div>
        </div>
            </div>
            
        </div>
        
        </div>
        <div id="footer"></div>
        <script type="text/javascript" src="${path}/js/admin-main-appearance.js"></script>
          <script src="${path}/js/amazeui.min.js"></script>
		<script src="${path}/js/jQuery.print.js"></script>
    <script type='text/javascript'>
    	$(document).ready(function () {
    	var now = new Date();
    	var year = now.getFullYear();       //年
        var month = now.getMonth() + 1;     //月
        var day = now.getDate();  
        var date = year + "年" + month + "月" + day +"日" ; 
        $("#date1").html(date + '&nbsp;&nbsp;');
        $("#date2").html(date + '&nbsp;&nbsp;');
       /*  var passportNo = getCookie("passportNo");
        //alert(passportNo);
        var stuName = getCookie("stuName"); */
        /* $(".name").html(stuName);
         */
        var passportNo = "${passportNo}";
        $.ajax({
                                        async: false,
                                        type: "POST",
                                        url: "${path}/adminSingleStuScoreManage/dataPrint",
                                        dataType: "json",
                                        data: {
                                            passportNo: passportNo,
                                        },
                                        success: function (data) {
                                        var name = data[0][0].firstName + " "+data[0][0].lastName;
                                        //alert(JSON.stringify(data));
                                        $(".name").html(name );
                                        $("#term").html(data[0][0].eduStartDate);
                                        $(".passNo").html(passportNo);
                                        $.each(data,function(num,data){
                                        	//alert(data.length);
                                        	
                                        	$("#grade").append(
                                                    '<div style="width:100%;border:0px solid red;margin-bottom:25px;margin-left:5px;float:left"><table id='+data[0].sNo+num+'>'+
                            '<tr><td colspan="2">Duration：'+data[0].termValue+'</td><td colspan="2">Credits</td><td colspan="2">Mark</td></tr>'+
                            '<tr><th>Unit Code</th><th>Unit Title</th><th>Awarded</th><th>Attempt</th><th>(%)</th><th>Outcome</th>'+
                            '</tr>'+'</table></div>');
                                        $.each(data,function(n,datas){
                                        	$("#"+data[0].sNo+num).append('<tr><td>'+datas.courseNo+'</td><td>'+datas.courseName+'</td><td>'+datas.credit+'</td><td>'+datas.gradeStatus+'</td><td>'+datas.grade+'</td><td>'+datas.gradeLevel+'</td></tr>');
                                       
                                        })
                                        })
                                          
                                        },
                                        error: function (err) {
                                            
                                        },
                                    });
    	})
    
        //<![CDATA[
        $(function() {
        	
            $("#ele2").find('.print-link').on('click', function() {
                //Print ele2 with default options
                $.print("#ele2");
            }); 
        });
        //]]>
    </script>
        
    </body>
</html>
